package top.meijhm.communitymanagement.common.error;

public class ErrorResponse {
    private String code;
    private String description;
    private String message;

    public ErrorResponse() {
    }

    public ErrorResponse(ErrorCode errorCode, String message) {
        code = errorCode.getCode();
        description = errorCode.getDescription();
        this.message = message;
    }

    @Override
    public String toString() {
        return "ErrorResponse{" +
                "code='" + code + '\'' +
                ", description='" + description + '\'' +
                ", message='" + message + '\'' +
                '}';
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}